/*
 * =====================================================================================
 *
 *       Filename:  read_share_mem.c
 *
 *    Description:  read data from share memory
 *
 *        Version:  1.0
 *        Created:  01/22/15 10:29:13
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  yangkun (yk)
 *          Email:  kun.yang@omnificweb.com
 *        Company:  omnificweb.com
 *
 * =====================================================================================
 */

#include <stdio.h>
int main()
{
	char buf[200]={0};
	if(0 != init_share_mem(0))
	{
		printf("init share mem error\n");
		return -1;
	}
	//sleep(10);
	if(0 != read_share_mem(buf, sizeof(buf)))
	{
		printf("write share memory error");
		return -2;
	}
	printf("buf:%s\n",buf);
}
